import { Router } from 'https://deno.land/x/oak/mod.ts'
import {
  Home,
  GetUsers,
  GetUser,
  CreateUser,
  UpdateUser,
  DeleteUser,
} from './controllers/user.ts'
const router = new Router()
/**
 * 路由管理
 */
router.get('/', Home)
  // 用户模块
  .get('/v1/users', GetUsers)
  .get('/v1/users/:id', GetUser)
  .post('/v1/users', CreateUser)
  .put('/v1/users/:id', UpdateUser)
  .delete('/v1/users/:id', DeleteUser)

export default router